package com.mtiiot.fstcpserver.fastdfs.core;

import java.io.IOException;


public class Connection {
	private TrackerClient trackerClient;
	private TrackerServer trackerServer;
	private StorageServer storageServer;
	private StorageClient1 storageClient1;
	
	public Connection(){
		try {
			trackerClient = new TrackerClient();
			trackerServer = trackerClient.getConnection();
			storageClient1 = new StorageClient1(trackerServer, storageServer);
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
	
	public void close(){
		try {
			trackerServer.close();
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
	
	public TrackerClient getTrackerClient() {
		return trackerClient;
	}
	public TrackerServer getTrackerServer() {
		return trackerServer;
	}
	public StorageServer getStorageServer() {
		return storageServer;
	}
	public StorageClient1 getStorageClient1() {
		return storageClient1;
	}
}
